import { IPSDEDRCtrlItem } from './ipsdedrctrl-item';
import { IPSDEDRTab } from './ipsdedrtab';
import { IPSDEDRTabPage } from './ipsdedrtab-page';
import { PSDEDRCtrlImpl } from './psdedrctrl-impl';

export class PSDEDRTabImpl extends PSDEDRCtrlImpl implements IPSDEDRTab {
  protected psdedrctrlitems: IPSDEDRCtrlItem[] | null = null;

  getPSDEDRCtrlItems(): IPSDEDRCtrlItem[] | null {
    if (this.psdedrctrlitems == null) {
      this.psdedrctrlitems = this.fillChildListModel(this.M.getPSDEDRCtrlItems, 'control.drctrl.IPSDEDRCtrlItem') as IPSDEDRCtrlItem[];
    }
    return this.psdedrctrlitems;
  }

  get psDEDRCtrlItems(): IPSDEDRCtrlItem[] | null {
    return this.getPSDEDRCtrlItems();
  }

  findPSDEDRCtrlItem(objKey: any): IPSDEDRCtrlItem | null {
    return this.getPSModel5('control.drctrl.IPSDEDRCtrlItem', this.getPSDEDRCtrlItems(), objKey) as IPSDEDRCtrlItem;
  }

  protected psdedrtabpages: IPSDEDRTabPage[] | null = null;

  getPSDEDRTabPages(): IPSDEDRTabPage[] | null {
    if (this.psdedrtabpages == null) {
      this.psdedrtabpages = this.fillChildListModel(this.M.getPSDEDRTabPages, 'control.drctrl.IPSDEDRTabPage') as IPSDEDRTabPage[];
    }
    return this.psdedrtabpages;
  }

  get psDEDRTabPages(): IPSDEDRTabPage[] | null {
    return this.getPSDEDRTabPages();
  }

  findPSDEDRTabPage(objKey: any): IPSDEDRTabPage | null {
    return this.getPSModel5('control.drctrl.IPSDEDRTabPage', this.getPSDEDRTabPages(), objKey) as IPSDEDRTabPage;
  }

  get cls(): string {
    return 'PSDEDRTabImpl';
  }

  instanceof(cls: string): boolean {
    if (cls == 'control.drctrl.IPSDEDRTab' || cls == 'control.drctrl.IPSDRTab') return true;
    return super.instanceof(cls);
  }
}
